<template>
  <div>
    <h2>申请主体信息</h2>
    <hr>
    <el-form :inline="true" :model="formInline" class="demo-form-inline">
      <el-form-item label="公寓名称:" label-width="200px">
        {{ formInline.detail.name }}
      </el-form-item>
      <el-form-item label="类型:" label-width="300px">
        {{ formInline.detail.type == 0 ? '个人职业房东' : '公司化公寓' }}
      </el-form-item>
      <br>
      <el-form-item label="公司名称:" label-width="200px">
        {{ formInline.detail.name }}
      </el-form-item>
      <el-form-item label="联系人:" label-width="300px">
        {{ formInline.detail.name }}
      </el-form-item>
      <br>
      <el-form-item label="手机号:" label-width="190px">
        {{ formInline.sysUser.phonenumber }}
      </el-form-item>
      <el-form-item label="申请时间:" label-width="300px">
        {{ formInline.detail.createTime }}
      </el-form-item>
      <br>
      <el-form-item label="法人姓名:" label-width="190px">
        {{ formInline.detail.corporation }}
      </el-form-item>
      <el-form-item label="法人身份证:" label-width="300px">
        {{ formInline.detail.certNum }}
      </el-form-item>
      <br>
      <el-form-item label="公司地址:" label-width="190px">
        {{ formInline.detail.address }}
      </el-form-item>
      <el-form-item label="账户类型:" label-width="300px">
        {{ formInline.detail.a }}
      </el-form-item>
      <br>
      <el-form-item label="法人身份证:" label-width="190px">
        <el-image style="width: 100px; height: 100px" :src="formInline.detail.certPicture"></el-image>
        <el-image style="width: 100px; height: 100px" :src="formInline.detail.certPicture2"></el-image>
        <el-image style="width: 100px; height: 100px" :src="formInline.detail.certPicture3"></el-image>
      </el-form-item>
      <h2>申请主体信息</h2>
      <hr>
      <el-form-item label="租客姓名:" label-width="200px">
        {{ formInline.contractDetail.tenantName }}
      </el-form-item>
      <el-form-item label="租客身份证号:" label-width="300px">
        {{ formInline.contractDetail.tenantCardNo }}
      </el-form-item>
      <br>
      <el-form-item label="租客手机号:" label-width="200px">
        {{ formInline.contractDetail.tenantPhone }}
      </el-form-item>
      <el-form-item label="承租房间:" label-width="300px">
        {{ formInline.contractDetail.roomName }}
      </el-form-item>
      <br>
      <el-form-item label="月租金:" label-width="190px">
        {{ formInline.contractDetail.monthRent + '元' }}
      </el-form-item>
      <el-form-item label="押金:" label-width="300px">
        {{ formInline.contractDetail.deposit + '元' }}
      </el-form-item>
      <br>
      <el-form-item label="租约起始时期:" label-width="190px">
        {{ formInline.contractDetail.startDate }}
      </el-form-item>
      <el-form-item label="租约终止时期:" label-width="300px">
        {{ formInline.contractDetail.endDate }}
      </el-form-item>
      <br>
      <el-form-item label="还款周期:" label-width="190px">
        {{ formInline.contractDetail.depositType + '个月' }}
      </el-form-item>
      <el-form-item label="还款账期:" label-width="300px">
        {{ formInline.installment.monthLimit + '个月' }}
      </el-form-item>
      <br>
      <el-form-item label="服务费:" label-width="190px">
        {{ formInline.installment.serCharge + '元' }}
      </el-form-item>
      <el-form-item label="利息:" label-width="300px">
        {{ formInline.rateCount + '元' }}
      </el-form-item>
      <br>
      <el-form-item label="待收租金合计:" label-width="300px">
        {{ formInline.installment.loanAmount + '元' }}
      </el-form-item>
      <br>
    </el-form>
    <el-button v-if="formInline.installment.applyState==1?true:false" type="primary" @click="test1">初审通过</el-button>
    <el-button v-if="formInline.installment.applyState==1?true:false" type="primary" @click="test2">初审不通过
    </el-button>
    <el-button v-if="formInline.installment.applyState==2?true:false" type="primary" @click="test1">复审通过</el-button>
    <el-button v-if="formInline.installment.applyState==2?true:false" type="primary" @click="test2">复审不通过
    </el-button>
  </div>
</template>
<script>
import {test1, test2} from "@/api/wishu/finance/finance";

export default {
  name: "index.vue",
  data() {
    return {
      formInline: {},
    }
  }, methods: {
    test2() {
      test2(this.formInline).then(res => {
        if (res.code == 200) {
          this.$message.success("操作成功");
          this.$router.push("/jinlong/rent");
        }
      });
    },
    test1() {
      test1(this.formInline).then(res => {
        if (res.code == 200) {
          this.$message.success("通过");
          this.$router.push("/jinlong/rent");
        }
      });
    }
  }, created() {
    this.formInline = this.$route.query.dataParam;
  }
}
</script>

<style scoped>

</style>
